Skip to content

Build and publish dev docs#4579

Merged
andrewsanchez merged 26 commits intomainfrom
rtd
Mar 31, 2026
Merged

Build and publish dev docs#4579
andrewsanchez merged 26 commits intomainfrom
rtd

Conversation

@andrewsanchez
Copy link
Copy Markdown
Contributor

@andrewsanchez andrewsanchez commented Mar 2, 2026

Closes #4578

Docs can be viewed here: https://dev-docs.ankiweb.net/en/latest/

Or built and viewed locally with just docs-serve

Comment thread docs/development.md Outdated
Comment thread docs/conf.py Outdated
Comment thread docs/development.md Outdated
Comment thread docs/development.md Outdated
Co-authored-by: Abdo <abdo@abdnh.net>
Comment thread docs/development.md Outdated
Comment thread pyproject.toml
Comment thread Cargo.lock
"option-ext",
"redox_users 0.5.2",
"windows-sys 0.60.2",
"windows-sys 0.59.0",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cargo update -p rustls-webpki and cargo update -p tar were apparently needed due to failing GHA checks.

@andrewsanchez andrewsanchez marked this pull request as ready for review March 26, 2026 20:42
@read-the-docs-community
Copy link
Copy Markdown

read-the-docs-community Bot commented Mar 26, 2026

Documentation build overview

📚 Anki | 🛠️ Build #32046691 | 📁 Comparing 6f9fe85 against latest (539633c)


🔍 Preview build

Show files changed (2 files in total): 📝 2 modified | ➕ 0 added | ➖ 0 deleted
File Status
development.html 📝 modified
index.html 📝 modified

@andrewsanchez
Copy link
Copy Markdown
Contributor Author

Follow-up: Include generated code in docs

The current RTD setup only documents source-level Python (pylib/anki, qt/aqt). The old Sphinx config also included out/pylib/anki and out/qt/_aqt, which contain ~30k lines of generated code that's arguably the most valuable to document for add-on developers:

  • hooks_gen.py / _aqt/hooks.py
  • *_pb2.pyi type stubs (~20k lines)
  • _backend_generated.py — low-level Rust backend wrapper

Generating this code requires ./ninja pylib qt, which needs Rust toolchain, protoc, Node.js, etc. — not feasible in RTD's build environment.

Proposed approach for follow up task:

Use a GH Actions workflow to build the docs instead of (or in addition to) RTD:

  1. Run ./ninja pylib qt to generate the code (Rust/protoc/Node already available in existing CI)
  2. Run sphinx-build with autoapi_dirs pointing at both source and generated output
  3. Deploy to GitHub Pages (or push built HTML to RTD via their API)

This would give the docs site the generated hooks and protobuf types, which are what add-on developers most need documented.

@andrewsanchez andrewsanchez changed the title Readthedocs POC Build and publish dev docs Mar 26, 2026
@andrewsanchez andrewsanchez merged commit 6b61393 into main Mar 31, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build and deploy dev docs

3 participants